package kr.hkit.Powerjava.chapter06.work;

public class GugudanFor {
	
	public static void main(String[] args) {
		
//		for(int i=1;i<10;i++){
//			System.out.printf("%2d * %2d = %2d%n",2,i,2*i);
//		}
	
//	for(int i=2;i<10;i++){
//		
		calGuguDan(5);
//	}
		
//		calGuguDan();
//		calFact(5);
	
	}
	private static void calGuguDan(int dan) {
		for(int i=1;i<10;i++){
			if (i==5) continue;
			System.out.printf("%2d * %2d = %2d%n", dan,i,dan*i);
		}
			System.out.println();			
	}		
	
	

	private static void calFact(int i) {
		
		int fact = 1;
		
		for(int j=1;j<i+1;j++){
			fact *= j;		//fact = fact * j;
		}
		System.out.println(fact);
		
	}

	private static void calGuguDan() {
		for(int dan=2;dan<10;dan++){
			for(int i=1;i<10;i++){
				System.out.printf("%2d * %2d = %2d%n", dan,i,dan*i);
			}
			System.out.println();			
		}		
	}	
}

